import * as mecharts from 'echarts';
export function radar(data,value) {
  return {
    title: {
      text: ''
    },
    color: ['red'],
    tooltip: {
      axisPointer: {            // 坐标轴指示器，坐标轴触发有效
        type: 'cross'        // 默认为直线，可选为：'line' | 'shadow'
      },
    },
    radar: {
      shape: 'circle',
      indicator:data,
      name: {
        textStyle: {
          color: 'red',
          // backgroundColor: '#f5c7c9',
          // borderRadius: 3,
          // padding: [6, 5]
        }
      },
      splitArea: {
        areaStyle: {
          color: ['#f5c7c9'],
        }
      },
    },
    series: [{
      name: '',
      type: 'radar',
      data: [
        {
          value: value,
          name: '风险对比',
          symbol: 'circle',
          symbolSize: 10,
          label: {
            show: true,
            formatter: function (params) {
              return params.value;
            }
          }
        },
      ]
    }]
  }
}
